package hibernate;
// Generated Aug 6, 2012 8:52:27 AM by Hibernate Tools 3.2.1.GA

import java.io.File;


/**
 * This class is used to get and set unscheduled activities.  This is the table with
 * all of the activities that are available.
 * This class will be stored in the ACTIVITY table.
 * 
 * When creating an activity that is scheduled use the following steps:
 * 
 * ScheduledActivity schedActitity = (Activity) obj;  Where the obj is one of the activities of this class
 * 
 * This way the table SCHEDULED_ACTIVITIES is where all of the schedActivity will be saved.
 * 
 */
public class Activity  implements java.io.Serializable, Comparable {

    
     private int activityId;
     private String name = "";
     private String imageName = "";
     private String phonetic = "";
     private File image = null;
     private File sound = null;
     
    public Activity() {
    }
	
    public Activity(int activityId) {
        this.activityId = activityId;
    }
    public Activity(int activityId, String imageName, String phonetic) {
       this.activityId = activityId;
       this.imageName = imageName;
       this.phonetic = phonetic;
    }
    
    public Activity(Activity a){
        this.activityId = a.activityId;
        this.imageName = a.imageName;
        this.name = a.name;
        this.phonetic = a.phonetic;
    }
   
    public int getActivityId() {
        return this.activityId;
    }
    
    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }
        public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImageName() {
        return this.imageName;
    }
    
    public void setImageName(String imageName) {
        this.imageName = imageName;
    }
    public String getPhonetic() {
        return this.phonetic;
    }
    
    public void setPhonetic(String phonetic) {
        this.phonetic = phonetic;
    }

    public File getImage() {
        return image;
    }

    public void setImage(File image) {
        this.image = image;
    }

    public File getSound() {
        return sound;
    }

    public void setSound(File sound) {
        this.sound = sound;
    }
    
    @Override
    public int compareTo(Object o) {
        Activity a = (Activity) o;
        if (this.name.matches(a.name)) return 0;
        return -1;
    }
    
}


